﻿//by concisetony
//created date: 10.5.12
//core logic of concisebar
var concisebar =  function(){
	//private
	
	//public
	return {
	}//public end
}();


//by concisetony
//created date: 10.5.12
//utils of concisebar
concisebar.util = function(){
	//private
	
	//public
	return {
		createNS : function( ns_name ){
			if(ns_name && typeof ns_name == "string"){
				var arr = ns_name.split( "." );
				var ns = "";
				for( var i = 0; i < arr.length; i++ ){
					if( arr[i] != "" ){
						if( ns == "" )
							ns = arr[0];
						else
							ns += "." + arr[i];
						eval( ns + "=" + ns + "||{};" );
					}
					else{
						//error alert
						alert( "concisebar.util.createNS: param input error" );
						continue;
					}
				}
			}
			else{
				//error alert
				alert( "concisebar.util.createNS: param empty or wrong type." );
			}
		}
	}//public end
}();

 


//by concisetony
//created date: 10.5.12
//unit test
var cb = concisebar;


